Skip to content

feat: improvements to onboarding flow#1295

Merged
HardeepAsrani merged 3 commits intodevelopmentfrom
improve/onboarding
Mar 30, 2026
Merged

feat: improvements to onboarding flow#1295
HardeepAsrani merged 3 commits intodevelopmentfrom
improve/onboarding

Conversation

@HardeepAsrani
Copy link
Copy Markdown
Member

@HardeepAsrani HardeepAsrani commented Mar 27, 2026

Summary

This PR improves the onboarding flow by removing redundant steps and combining them. All e2e related to the PR have passed. The remaining are unrelated to the PR and will be fixed separately.

Will affect visual aspect of the product

YES

Screenshots

Test instructions

  • Make sure all the steps work.
  • Make sure the plugin installation works properly and isn't interrupted by any plugin-specific onboardings.

Check before Pull Request is ready:

Closes https://github.com/Codeinwp/visualizer-pro/issues/554.

@pirate-bot pirate-bot added the pr-checklist-complete The Pull Request checklist is complete. (automatic label) label Mar 27, 2026
@pirate-bot
Copy link
Copy Markdown
Contributor

pirate-bot commented Mar 27, 2026

Plugin build for e1c36d3 is ready 🛎️!

Copilot AI added a commit that referenced this pull request Mar 27, 2026
@selul selul requested a review from Copilot March 27, 2026 20:02
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR streamlines the Visualizer setup wizard/onboarding flow by reducing the number of steps and consolidating “extra features” + newsletter into a single final step, while updating UI, JS behavior, and E2E coverage accordingly.

Changes:

  • Reduced wizard from 5 steps to 3 and redesigned the final step to include optional plugin installs + newsletter opt-in.
  • Updated wizard frontend logic to run chart import inline, install selected plugins sequentially, and then finish/redirect.
  • Refreshed wizard styling (grid-based chart picker, new option cards) and updated E2E onboarding test to match the new flow.

Reviewed changes

Copilot reviewed 6 out of 9 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
tests/e2e/specs/onboarding.spec.ts Updates E2E onboarding assertions and interactions for the new 3-step wizard flow.
templates/setup-wizard.php Restructures wizard steps, adds final consolidated “You’re all set!” options UI, adds new plugin-active checks.
js/setup-wizard.js Refactors step transitions (inline import), adds sequential plugin install flow, updates finish/subscribe behavior.
css/style-wizard.css Updates layout/styling for new step structure and chart list grid; adds final-step option card styles.
classes/Visualizer/Module/Wizard.php Improves POST sanitization; returns chart_id on import; generalizes plugin install/activation for multiple slugs.
classes/Visualizer/Module/Setup.php Avoids activation redirect during AJAX/cron; keeps activation redirect behavior for normal admin requests.
images/spc-logo.svg Adds Super Page Cache logo asset for final-step option card UI.
images/otter-logo.png Adds Otter Blocks logo asset for final-step option card UI.
Comments suppressed due to low confidence (2)

js/setup-wizard.js:38

  • res.message is inserted into the DOM via .html(...) (and plugin-install errors are also injected with .html('<p>' + message + '</p>')). To avoid XSS risk from unexpected markup in server-provided messages, prefer .text(...) (or escape before injecting) and build the DOM nodes without string concatenation.
		$.post(visualizerSetupWizardData.ajax.url, postData, function (res) {

			// Toggle the redirect popup.
			$('.redirect-popup').find('h3.popup-title').html(res.message);
			$('.redirect-popup').show();

js/setup-wizard.js:393

  • This script no longer initializes Slick (the previous $('.vz-chart-list > ul').slick(...) block was removed), but the wizard still enqueues slick.min.css and registers jquery-slick as a dependency for SmartWizard. To avoid loading unused JS/CSS on the wizard screen, consider removing the Slick enqueues/dependency if it’s no longer needed anywhere in the setup wizard.
	$(window).bind('pageshow', function() {
		if ( jQuery('.vz-chart-option input').is(':checked') ) {
			$('#step-1').find('button.disabled').removeClass('disabled');
		}
	});
});

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@rodica-andronache
Copy link
Copy Markdown
Contributor

@HardeepAsrani we can merge this one too. Thanks!

@HardeepAsrani HardeepAsrani merged commit f42382f into development Mar 30, 2026
8 of 9 checks passed
@HardeepAsrani HardeepAsrani deleted the improve/onboarding branch March 30, 2026 10:51
@pirate-bot
Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 4.0.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@pirate-bot pirate-bot added the released Indicate that an issue has been resolved and released in a particular version of the product. label Mar 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-checklist-complete The Pull Request checklist is complete. (automatic label) released Indicate that an issue has been resolved and released in a particular version of the product.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants